var app = getApp();

Page({
    data: {},
    fknr: function(e) {
        this.setData({
            fknr: e.detail.value
        });
    },
    submitfk: function() {
        var user_id = wx.getStorageSync("users").id,
            fknr = this.data.fknr;
        if ("" == fknr) {
            wx.showModal({
                title: "提示",
                content: "请填写意见反馈信息后提交！"
            });
            return false;
        }
        app.util.request({
            url: "entry/wxapp/AddFeedback",
            cachetime: "0",
            data: {
                user_id: user_id,
                content: fknr
            },
            success: function(n) {
                wx.showModal({
                    title: "提示",
                    content: "感谢您的反馈意见！",
                    success: function(res) {
                        if (res.confirm) {
                            wx.navigateBack({});
                        }
                    }
                });
            }
        });
    },
    onLoad: function(e) {
        app.setNavigationBarColor(this);
    },
});